/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ejb;

import javax.ejb.EJB;
import javax.jws.Oneway;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
import javax.ejb.Stateless;

/**
 *
 * @author Max
 */
@WebService(serviceName = "HotelWebService")
@Stateless()
public class HotelWebService {
    @EJB
    private BusinessLogic ejbRef;// Add business logic below. (Right-click in editor and choose
    // "Insert Code > Add Web Service Operation")

    @WebMethod(operationName = "crea")
    @Oneway
    public void crea(@WebParam(name = "numLetti") int numLetti) {
        ejbRef.crea(numLetti);
    }

    @WebMethod(operationName = "camereLibere")
    public int camereLibere(@WebParam(name = "numLetti") int numLetti) {
        return ejbRef.camereLibere(numLetti);
    }

    @WebMethod(operationName = "prenotaCamera")
    public int prenotaCamera(@WebParam(name = "numLetti") int numLetti, @WebParam(name = "nome") String nome, @WebParam(name = "cognome") String cognome, @WebParam(name = "username") String username) {
        return ejbRef.prenotaCamera(numLetti, nome, cognome, username);
    }
    
}
